home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / AdobeExamples / NX_LineDraw / DrawViewWraps.c < prev    next >
C/C++ Source or Header  |  1995-06-12  |  28KB  |  835 lines

  1. /* DrawViewWraps.c generated from DrawViewWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "DrawViewWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42. *    DrawViewWraps.psw
  43. *
  44. *    Here lie the wraps used in DrawView.m for the LineDrawing application.
  45. *    Several ways to draw lines are shown here.  One that is not is to use the
  46. *    single operator functions from the method directly.
  47. *
  48. *    PostScript operators obtain their operands from the stack.
  49. *    As a result the order of placing the operands on the stack is very important.
  50. *    In the examples below,  comments are used in the bound procedures
  51. *    to indicate the operands on stack when the procedure is called.
  52. *    One common problem area is to inadvertently place the operands on 
  53. *    stack in the wrong order. 
  54. *
  55. *    Version:    2.0
  56. *    Author:    Ken Anderson, Ken Fromm
  57. *    History:
  58. *            03-07-91        Added this comment.
  59. */
  60.  
  61. /* StartTime is stored in the interpreter and contains the initial real time */
  62. #line 63 "DrawViewWraps.c"
  63. void PSWMarkTime( void )
  64. {
  65.   typedef struct {
  66.     unsigned char tokenType;
  67.     unsigned char topLevelCount;
  68.     unsigned short nBytes;
  69.  
  70.     DPSBinObjGeneric obj0;
  71.     DPSBinObjGeneric obj1;
  72.     DPSBinObjGeneric obj2;
  73.     } _dpsQ;
  74.   static const _dpsQ _dpsStat = {
  75.     DPS_DEF_TOKENTYPE, 3, 28,
  76.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* StartTime */
  77.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  78.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  79.     }; /* _dpsQ */
  80.   _dpsQ _dpsF;    /* local copy  */
  81.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  82.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  83.   static long int _dpsCodes[1] = {-1};
  84.   {
  85. if (_dpsCodes[0] < 0) {
  86.     static const char * const _dps_names[] = {
  87.     "StartTime"};
  88.     long int *_dps_nameVals[1];
  89.     _dps_nameVals[0] = &_dpsCodes[0];
  90.  
  91.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  92.     }
  93.   }
  94.  
  95.   _dpsF = _dpsStat;    /* assign automatic variable */
  96.  
  97.   _dpsP[0].val.nameVal = _dpsCodes[0];
  98.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  99. }
  100. #line 56 "DrawViewWraps.psw"
  101.  
  102.  
  103. /* The difference between the current real time and the initial time stored                */
  104. /* in StartTime is returned to the calling procedure in the output arg ElapsedTime. */
  105. #line 106 "DrawViewWraps.c"
  106. void PSWReturnTime(int *ElapsedTime)
  107. {
  108.   typedef struct {
  109.     unsigned char tokenType;
  110.     unsigned char topLevelCount;
  111.     unsigned short nBytes;
  112.  
  113.     DPSBinObjGeneric obj0;
  114.     DPSBinObjGeneric obj1;
  115.     DPSBinObjGeneric obj2;
  116.     DPSBinObjGeneric obj3;
  117.     DPSBinObjGeneric obj4;
  118.     DPSBinObjGeneric obj5;
  119.     DPSBinObjGeneric obj6;
  120.     DPSBinObjGeneric obj7;
  121.     DPSBinObjGeneric obj8;
  122.     } _dpsQ;
  123.   static const _dpsQ _dpsStat = {
  124.     DPS_DEF_TOKENTYPE, 9, 76,
  125.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  126.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* StartTime */
  127.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  128.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  129.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  130.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  131.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  132.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  133.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  134.     }; /* _dpsQ */
  135.   _dpsQ _dpsF;    /* local copy  */
  136.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  137.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  138.   static long int _dpsCodes[1] = {-1};
  139.   DPSResultsRec _dpsR[1];
  140.   static const DPSResultsRec _dpsRstat[] = {
  141.     { dps_tInt, -1 },
  142.     };
  143.     _dpsR[0] = _dpsRstat[0];
  144.     _dpsR[0].value = (char *)ElapsedTime;
  145.  
  146.   {
  147. if (_dpsCodes[0] < 0) {
  148.     static const char * const _dps_names[] = {
  149.     "StartTime"};
  150.     long int *_dps_nameVals[1];
  151.     _dps_nameVals[0] = &_dpsCodes[0];
  152.  
  153.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  154.     }
  155.   }
  156.  
  157.   _dpsF = _dpsStat;    /* assign automatic variable */
  158.  
  159.   _dpsP[1].val.nameVal = _dpsCodes[0];
  160.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  161.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  162.   DPSAwaitReturnValues(_dpsCurCtxt);
  163. }
  164. #line 63 "DrawViewWraps.psw"
  165.  
  166.  
  167. /*
  168. * This wrap is called in the +newFrame:(NXRect *) frm method to
  169. * define and bind procedures in the interpreter.  These procedures
  170. * are then called from within other wraps. Binding replaces each
  171. * executable operator name with its value.  During execution of the
  172. * procedures, the interpreter encounters the operators themselves
  173. * instead of the names of the operators.  A procedure that has been
  174. * bounded will execute faster than one that has not been bound. 
  175. * Certain caveats pertain; see the red book for further information.
  176. */
  177. #line 178 "DrawViewWraps.c"
  178. void PSWDefs( void )
  179. {
  180.   typedef struct {
  181.     unsigned char tokenType;
  182.     unsigned char topLevelCount;
  183.     unsigned short nBytes;
  184.  
  185.     DPSBinObjGeneric obj0;
  186.     DPSBinObjGeneric obj1;
  187.     DPSBinObjGeneric obj2;
  188.     DPSBinObjGeneric obj3;
  189.     DPSBinObjGeneric obj4;
  190.     DPSBinObjGeneric obj5;
  191.     DPSBinObjGeneric obj6;
  192.     DPSBinObjGeneric obj7;
  193.     DPSBinObjGeneric obj8;
  194.     DPSBinObjGeneric obj9;
  195.     DPSBinObjGeneric obj10;
  196.     DPSBinObjGeneric obj11;
  197.     DPSBinObjGeneric obj12;
  198.     DPSBinObjGeneric obj13;
  199.     DPSBinObjGeneric obj14;
  200.     DPSBinObjGeneric obj15;
  201.     DPSBinObjGeneric obj16;
  202.     DPSBinObjGeneric obj17;
  203.     DPSBinObjGeneric obj18;
  204.     DPSBinObjGeneric obj19;
  205.     DPSBinObjGeneric obj20;
  206.     DPSBinObjGeneric obj21;
  207.     DPSBinObjGeneric obj22;
  208.     DPSBinObjGeneric obj23;
  209.     DPSBinObjGeneric obj24;
  210.     DPSBinObjGeneric obj25;
  211.     DPSBinObjGeneric obj26;
  212.     DPSBinObjGeneric obj27;
  213.     DPSBinObjGeneric obj28;
  214.     DPSBinObjGeneric obj29;
  215.     DPSBinObjGeneric obj30;
  216.     DPSBinObjGeneric obj31;
  217.     DPSBinObjGeneric obj32;
  218.     DPSBinObjGeneric obj33;
  219.     DPSBinObjGeneric obj34;
  220.     DPSBinObjGeneric obj35;
  221.     DPSBinObjGeneric obj36;
  222.     DPSBinObjGeneric obj37;
  223.     DPSBinObjGeneric obj38;
  224.     DPSBinObjGeneric obj39;
  225.     DPSBinObjGeneric obj40;
  226.     DPSBinObjGeneric obj41;
  227.     DPSBinObjGeneric obj42;
  228.     DPSBinObjGeneric obj43;
  229.     DPSBinObjGeneric obj44;
  230.     DPSBinObjGeneric obj45;
  231.     DPSBinObjGeneric obj46;
  232.     DPSBinObjGeneric obj47;
  233.     DPSBinObjGeneric obj48;
  234.     DPSBinObjGeneric obj49;
  235.     DPSBinObjGeneric obj50;
  236.     DPSBinObjGeneric obj51;
  237.     DPSBinObjGeneric obj52;
  238.     DPSBinObjGeneric obj53;
  239.     DPSBinObjGeneric obj54;
  240.     DPSBinObjGeneric obj55;
  241.     DPSBinObjGeneric obj56;
  242.     DPSBinObjGeneric obj57;
  243.     DPSBinObjGeneric obj58;
  244.     DPSBinObjGeneric obj59;
  245.     DPSBinObjGeneric obj60;
  246.     DPSBinObjGeneric obj61;
  247.     DPSBinObjGeneric obj62;
  248.     DPSBinObjGeneric obj63;
  249.     DPSBinObjGeneric obj64;
  250.     DPSBinObjGeneric obj65;
  251.     DPSBinObjGeneric obj66;
  252.     DPSBinObjGeneric obj67;
  253.     DPSBinObjGeneric obj68;
  254.     DPSBinObjGeneric obj69;
  255.     DPSBinObjGeneric obj70;
  256.     DPSBinObjGeneric obj71;
  257.     DPSBinObjGeneric obj72;
  258.     DPSBinObjGeneric obj73;
  259.     DPSBinObjGeneric obj74;
  260.     DPSBinObjGeneric obj75;
  261.     } _dpsQ;
  262.   static const _dpsQ _dpsStat = {
  263.     DPS_DEF_TOKENTYPE, 20, 612,
  264.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* EVB */
  265.     {DPS_EXEC|DPS_ARRAY, 0, 7, 552},
  266.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  267.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  268.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* DLB */
  269.     {DPS_EXEC|DPS_ARRAY, 0, 5, 512},
  270.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  271.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  272.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* DLRB */
  273.     {DPS_EXEC|DPS_ARRAY, 0, 9, 200},
  274.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  275.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  276.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* MLB */
  277.     {DPS_EXEC|DPS_ARRAY, 0, 2, 184},
  278.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  279.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  280.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* SLB */
  281.     {DPS_EXEC|DPS_ARRAY, 0, 3, 160},
  282.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  283.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  284.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  285.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  286.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  287.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  288.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  289.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  290.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  291.     {DPS_LITERAL|DPS_INT, 0, 0, 3},
  292.     {DPS_LITERAL|DPS_INT, 0, 0, -1},
  293.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 135},    /* roll */
  294.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  295.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  296.     {DPS_EXEC|DPS_ARRAY, 0, 30, 272},
  297.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  298.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  299.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PSW */
  300.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  301.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  302.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  303.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  304.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PSC */
  305.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  306.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  307.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  308.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  309.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PSX */
  310.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  311.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  312.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PSY */
  313.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  314.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  315.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  316.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  317.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  318.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PSX1 */
  319.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  320.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  321.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* PSY1 */
  322.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  323.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  324.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  325.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  326.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  327.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  328.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  329.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  330.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  331.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  332.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  333.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  334.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  335.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  336.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  337.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  338.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  339.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129},    /* rectstroke */
  340.     }; /* _dpsQ */
  341.   _dpsQ _dpsF;    /* local copy  */
  342.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  343.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  344.   static long int _dpsCodes[11] = {-1};
  345.   {
  346. if (_dpsCodes[0] < 0) {
  347.     static const char * const _dps_names[] = {
  348.     "EVB",
  349.     "DLB",
  350.     "DLRB",
  351.     "MLB",
  352.     "SLB",
  353.     "PSW",
  354.     "PSC",
  355.     "PSX",
  356.     "PSY",
  357.     "PSX1",
  358.     "PSY1"};
  359.     long int *_dps_nameVals[11];
  360.     _dps_nameVals[0] = &_dpsCodes[0];
  361.     _dps_nameVals[1] = &_dpsCodes[1];
  362.     _dps_nameVals[2] = &_dpsCodes[2];
  363.     _dps_nameVals[3] = &_dpsCodes[3];
  364.     _dps_nameVals[4] = &_dpsCodes[4];
  365.     _dps_nameVals[5] = &_dpsCodes[5];
  366.     _dps_nameVals[6] = &_dpsCodes[6];
  367.     _dps_nameVals[7] = &_dpsCodes[7];
  368.     _dps_nameVals[8] = &_dpsCodes[8];
  369.     _dps_nameVals[9] = &_dpsCodes[9];
  370.     _dps_nameVals[10] = &_dpsCodes[10];
  371.  
  372.     DPSMapNames(_dpsCurCtxt, 11, _dps_names, _dps_nameVals);
  373.     }
  374.   }
  375.  
  376.   _dpsF = _dpsStat;    /* assign automatic variable */
  377.  
  378.   _dpsP[0].val.nameVal = _dpsCodes[0];
  379.   _dpsP[4].val.nameVal = _dpsCodes[1];
  380.   _dpsP[8].val.nameVal = _dpsCodes[2];
  381.   _dpsP[12].val.nameVal = _dpsCodes[3];
  382.   _dpsP[16].val.nameVal = _dpsCodes[4];
  383.   _dpsP[35].val.nameVal = _dpsCodes[5];
  384.   _dpsP[40].val.nameVal = _dpsCodes[6];
  385.   _dpsP[45].val.nameVal = _dpsCodes[7];
  386.   _dpsP[48].val.nameVal = _dpsCodes[8];
  387.   _dpsP[54].val.nameVal = _dpsCodes[9];
  388.   _dpsP[57].val.nameVal = _dpsCodes[10];
  389.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,612);
  390. }
  391. #line 108 "DrawViewWraps.psw"
  392.  
  393.  
  394. /***  Called by -drawWraps ***/
  395. /* Calls the operators from the wrap itself. */
  396. #line 397 "DrawViewWraps.c"
  397. void PSWEraseView(float BGColor, float BGStrColor, float BGStrWidth, float BGrect[])
  398. {
  399.   typedef struct {
  400.     unsigned char tokenType;
  401.     unsigned char topLevelCount;
  402.     unsigned short nBytes;
  403.  
  404.     DPSBinObjReal obj0;
  405.     DPSBinObjGeneric obj1;
  406.     DPSBinObjGeneric obj2;
  407.     DPSBinObjGeneric obj3;
  408.     DPSBinObjReal obj4;
  409.     DPSBinObjGeneric obj5;
  410.     DPSBinObjReal obj6;
  411.     DPSBinObjGeneric obj7;
  412.     DPSBinObjGeneric obj8;
  413.     DPSBinObjGeneric obj9;
  414.     } _dpsQ;
  415.   static const _dpsQ _dpsStat = {
  416.     DPS_DEF_TOKENTYPE, 10, 148,
  417.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGColor */
  418.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  419.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 112},    /* param[const]: BGrect */
  420.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  421.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrColor */
  422.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  423.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrWidth */
  424.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  425.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 80},    /* param[const]: BGrect */
  426.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129},    /* rectstroke */
  427.     }; /* _dpsQ */
  428.   _dpsQ _dpsF;    /* local copy  */
  429.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  430.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  431.   register int _dps_offset = 80;
  432.   _dpsF = _dpsStat;    /* assign automatic variable */
  433.  
  434.   _dpsP[0].val.realVal = BGColor;
  435.   _dpsP[4].val.realVal = BGStrColor;
  436.   _dpsP[6].val.realVal = BGStrWidth;
  437.   _dpsP[8].val.arrayVal = _dps_offset;
  438.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  439.   _dpsP[2].val.arrayVal = _dps_offset;
  440.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  441.  
  442.   _dpsF.nBytes = _dps_offset+4;
  443.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,84);
  444.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  445.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  446. }
  447. #line 118 "DrawViewWraps.psw"
  448.  
  449.  
  450. /* Calls the operators from the wrap itself. */
  451. #line 452 "DrawViewWraps.c"
  452. void PSWDrawLine(float LineWidth, float LineColor, float X, float Y, float X1, float Y1)
  453. {
  454.   typedef struct {
  455.     unsigned char tokenType;
  456.     unsigned char topLevelCount;
  457.     unsigned short nBytes;
  458.  
  459.     DPSBinObjReal obj0;
  460.     DPSBinObjGeneric obj1;
  461.     DPSBinObjReal obj2;
  462.     DPSBinObjGeneric obj3;
  463.     DPSBinObjReal obj4;
  464.     DPSBinObjReal obj5;
  465.     DPSBinObjGeneric obj6;
  466.     DPSBinObjReal obj7;
  467.     DPSBinObjReal obj8;
  468.     DPSBinObjGeneric obj9;
  469.     DPSBinObjGeneric obj10;
  470.     } _dpsQ;
  471.   static const _dpsQ _dpsStat = {
  472.     DPS_DEF_TOKENTYPE, 11, 92,
  473.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  474.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  475.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineColor */
  476.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  477.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  478.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  479.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  480.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X1 */
  481.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y1 */
  482.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  483.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  484.     }; /* _dpsQ */
  485.   _dpsQ _dpsF;    /* local copy  */
  486.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  487.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  488.   _dpsF = _dpsStat;    /* assign automatic variable */
  489.  
  490.   _dpsP[0].val.realVal = LineWidth;
  491.   _dpsP[2].val.realVal = LineColor;
  492.   _dpsP[4].val.realVal = X;
  493.   _dpsP[5].val.realVal = Y;
  494.   _dpsP[7].val.realVal = X1;
  495.   _dpsP[8].val.realVal = Y1;
  496.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,92);
  497. }
  498. #line 127 "DrawViewWraps.psw"
  499.  
  500.  
  501.  
  502. /***  Called by -drawWrapsBind  ***/
  503. /* Places the input args on the stack and calls the EraseViewBind procedure. */
  504. #line 505 "DrawViewWraps.c"
  505. void PSWEraseViewBind(float BGColor, float BGStrColor, float BGStrWidth, float BGrect[])
  506. {
  507.   typedef struct {
  508.     unsigned char tokenType;
  509.     unsigned char topLevelCount;
  510.     unsigned short nBytes;
  511.  
  512.     DPSBinObjGeneric obj0;
  513.     DPSBinObjReal obj1;
  514.     DPSBinObjReal obj2;
  515.     DPSBinObjReal obj3;
  516.     DPSBinObjGeneric obj4;
  517.     } _dpsQ;
  518.   static const _dpsQ _dpsStat = {
  519.     DPS_DEF_TOKENTYPE, 5, 76,
  520.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 40},    /* param[const]: BGrect */
  521.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrWidth */
  522.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrColor */
  523.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGColor */
  524.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* EVB */
  525.     }; /* _dpsQ */
  526.   _dpsQ _dpsF;    /* local copy  */
  527.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  528.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  529.   static long int _dpsCodes[1] = {-1};
  530.   register int _dps_offset = 40;
  531.   {
  532. if (_dpsCodes[0] < 0) {
  533.     static const char * const _dps_names[] = {
  534.     "EVB"};
  535.     long int *_dps_nameVals[1];
  536.     _dps_nameVals[0] = &_dpsCodes[0];
  537.  
  538.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  539.     }
  540.   }
  541.  
  542.   _dpsF = _dpsStat;    /* assign automatic variable */
  543.  
  544.   _dpsP[3].val.realVal = BGColor;
  545.   _dpsP[2].val.realVal = BGStrColor;
  546.   _dpsP[1].val.realVal = BGStrWidth;
  547.   _dpsP[4].val.nameVal = _dpsCodes[0];
  548.   _dpsP[0].val.arrayVal = _dps_offset;
  549.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  550.  
  551.   _dpsF.nBytes = _dps_offset+4;
  552.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  553.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  554. }
  555. #line 134 "DrawViewWraps.psw"
  556.  
  557.  
  558. /* Places the input args on the stack and calls the DrawLineBind procedure. */
  559. #line 560 "DrawViewWraps.c"
  560. void PSWDrawLineBind(float LineWidth, float LineColor, float X, float Y, float X1, float Y1)
  561. {
  562.   typedef struct {
  563.     unsigned char tokenType;
  564.     unsigned char topLevelCount;
  565.     unsigned short nBytes;
  566.  
  567.     DPSBinObjReal obj0;
  568.     DPSBinObjReal obj1;
  569.     DPSBinObjReal obj2;
  570.     DPSBinObjReal obj3;
  571.     DPSBinObjReal obj4;
  572.     DPSBinObjReal obj5;
  573.     DPSBinObjGeneric obj6;
  574.     } _dpsQ;
  575.   static const _dpsQ _dpsStat = {
  576.     DPS_DEF_TOKENTYPE, 7, 60,
  577.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X1 */
  578.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y1 */
  579.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  580.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  581.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineColor */
  582.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  583.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* DLB */
  584.     }; /* _dpsQ */
  585.   _dpsQ _dpsF;    /* local copy  */
  586.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  587.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  588.   static long int _dpsCodes[1] = {-1};
  589.   {
  590. if (_dpsCodes[0] < 0) {
  591.     static const char * const _dps_names[] = {
  592.     "DLB"};
  593.     long int *_dps_nameVals[1];
  594.     _dps_nameVals[0] = &_dpsCodes[0];
  595.  
  596.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  597.     }
  598.   }
  599.  
  600.   _dpsF = _dpsStat;    /* assign automatic variable */
  601.  
  602.   _dpsP[5].val.realVal = LineWidth;
  603.   _dpsP[4].val.realVal = LineColor;
  604.   _dpsP[2].val.realVal = X;
  605.   _dpsP[3].val.realVal = Y;
  606.   _dpsP[0].val.realVal = X1;
  607.   _dpsP[1].val.realVal = Y1;
  608.   _dpsP[6].val.nameVal = _dpsCodes[0];
  609.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,60);
  610. }
  611. #line 139 "DrawViewWraps.psw"
  612.  
  613.  
  614.  
  615. /***  Called by -drawWrapsRepeat  ***/
  616. /* Defines input args, places the number of repetitions on the stack and then */
  617. /* calls the DrawLineRepeatBind procedure. */
  618. #line 619 "DrawViewWraps.c"
  619. void PSWDrawLineRepeatBind(float W[], float C[], float X[], float Y[], float X1[], float Y1[], int i)
  620. {
  621.   typedef struct {
  622.     unsigned char tokenType;
  623.     unsigned char topLevelCount;
  624.     unsigned short nBytes;
  625.  
  626.     DPSBinObjGeneric obj0;
  627.     DPSBinObjGeneric obj1;
  628.     DPSBinObjGeneric obj2;
  629.     DPSBinObjGeneric obj3;
  630.     DPSBinObjGeneric obj4;
  631.     DPSBinObjGeneric obj5;
  632.     DPSBinObjGeneric obj6;
  633.     DPSBinObjGeneric obj7;
  634.     DPSBinObjGeneric obj8;
  635.     DPSBinObjGeneric obj9;
  636.     DPSBinObjGeneric obj10;
  637.     DPSBinObjGeneric obj11;
  638.     DPSBinObjGeneric obj12;
  639.     DPSBinObjGeneric obj13;
  640.     DPSBinObjGeneric obj14;
  641.     DPSBinObjGeneric obj15;
  642.     DPSBinObjGeneric obj16;
  643.     DPSBinObjGeneric obj17;
  644.     DPSBinObjGeneric obj18;
  645.     DPSBinObjGeneric obj19;
  646.     } _dpsQ;
  647.   static const _dpsQ _dpsStat = {
  648.     DPS_DEF_TOKENTYPE, 20, 164,
  649.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* PSW */
  650.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: W */
  651.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  652.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* PSC */
  653.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: C */
  654.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  655.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* PSX */
  656.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: X */
  657.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  658.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* PSY */
  659.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: Y */
  660.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  661.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* PSX1 */
  662.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: X1 */
  663.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  664.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* PSY1 */
  665.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: Y1 */
  666.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  667.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: i */
  668.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* DLRB */
  669.     }; /* _dpsQ */
  670.   _dpsQ _dpsF;    /* local copy  */
  671.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  672.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  673.   static long int _dpsCodes[7] = {-1};
  674.   register int _dps_offset = 160;
  675.   {
  676. if (_dpsCodes[0] < 0) {
  677.     static const char * const _dps_names[] = {
  678.     "PSW",
  679.     "PSC",
  680.     "PSX",
  681.     "PSY",
  682.     "PSX1",
  683.     "PSY1",
  684.     "DLRB"};
  685.     long int *_dps_nameVals[7];
  686.     _dps_nameVals[0] = &_dpsCodes[0];
  687.     _dps_nameVals[1] = &_dpsCodes[1];
  688.     _dps_nameVals[2] = &_dpsCodes[2];
  689.     _dps_nameVals[3] = &_dpsCodes[3];
  690.     _dps_nameVals[4] = &_dpsCodes[4];
  691.     _dps_nameVals[5] = &_dpsCodes[5];
  692.     _dps_nameVals[6] = &_dpsCodes[6];
  693.  
  694.     DPSMapNames(_dpsCurCtxt, 7, _dps_names, _dps_nameVals);
  695.     }
  696.   }
  697.  
  698.   _dpsF = _dpsStat;    /* assign automatic variable */
  699.  
  700.   _dpsP[1].length = i;
  701.   _dpsP[4].length = i;
  702.   _dpsP[7].length = i;
  703.   _dpsP[10].length = i;
  704.   _dpsP[13].length = i;
  705.   _dpsP[16].length = i;
  706.   _dpsP[18].val.integerVal = i;
  707.   _dpsP[0].val.nameVal = _dpsCodes[0];
  708.   _dpsP[3].val.nameVal = _dpsCodes[1];
  709.   _dpsP[6].val.nameVal = _dpsCodes[2];
  710.   _dpsP[9].val.nameVal = _dpsCodes[3];
  711.   _dpsP[12].val.nameVal = _dpsCodes[4];
  712.   _dpsP[15].val.nameVal = _dpsCodes[5];
  713.   _dpsP[19].val.nameVal = _dpsCodes[6];
  714.   _dpsP[16].val.arrayVal = _dps_offset;
  715.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  716.   _dpsP[13].val.arrayVal = _dps_offset;
  717.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  718.   _dpsP[10].val.arrayVal = _dps_offset;
  719.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  720.   _dpsP[7].val.arrayVal = _dps_offset;
  721.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  722.   _dpsP[4].val.arrayVal = _dps_offset;
  723.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  724.   _dpsP[1].val.arrayVal = _dps_offset;
  725.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  726.  
  727.   _dpsF.nBytes = _dps_offset+4;
  728.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,164);
  729.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Y1, i);
  730.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)X1, i);
  731.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Y, i);
  732.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)X, i);
  733.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)C, i);
  734.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)W, i);
  735. }
  736. #line 151 "DrawViewWraps.psw"
  737.  
  738.  
  739.  
  740. /***  Called by -drawOptimizedStroke  ***/
  741. /* Places the input args on the stack and calls the MakeLineBind procedure. */
  742. #line 743 "DrawViewWraps.c"
  743. void PSWMakeLineBind(float X, float Y, float X1, float Y1)
  744. {
  745.   typedef struct {
  746.     unsigned char tokenType;
  747.     unsigned char topLevelCount;
  748.     unsigned short nBytes;
  749.  
  750.     DPSBinObjReal obj0;
  751.     DPSBinObjReal obj1;
  752.     DPSBinObjReal obj2;
  753.     DPSBinObjReal obj3;
  754.     DPSBinObjGeneric obj4;
  755.     } _dpsQ;
  756.   static const _dpsQ _dpsStat = {
  757.     DPS_DEF_TOKENTYPE, 5, 44,
  758.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X1 */
  759.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y1 */
  760.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  761.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  762.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* MLB */
  763.     }; /* _dpsQ */
  764.   _dpsQ _dpsF;    /* local copy  */
  765.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  766.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  767.   static long int _dpsCodes[1] = {-1};
  768.   {
  769. if (_dpsCodes[0] < 0) {
  770.     static const char * const _dps_names[] = {
  771.     "MLB"};
  772.     long int *_dps_nameVals[1];
  773.     _dps_nameVals[0] = &_dpsCodes[0];
  774.  
  775.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  776.     }
  777.   }
  778.  
  779.   _dpsF = _dpsStat;    /* assign automatic variable */
  780.  
  781.   _dpsP[2].val.realVal = X;
  782.   _dpsP[3].val.realVal = Y;
  783.   _dpsP[0].val.realVal = X1;
  784.   _dpsP[1].val.realVal = Y1;
  785.   _dpsP[4].val.nameVal = _dpsCodes[0];
  786.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  787. }
  788. #line 158 "DrawViewWraps.psw"
  789.  
  790.  
  791. /* Places the input args on the stack and calls the StrokeLineBind procedure. */
  792. #line 793 "DrawViewWraps.c"
  793. void PSWStrokeLineBind(float LineWidth, float LineColor)
  794. {
  795.   typedef struct {
  796.     unsigned char tokenType;
  797.     unsigned char topLevelCount;
  798.     unsigned short nBytes;
  799.  
  800.     DPSBinObjReal obj0;
  801.     DPSBinObjReal obj1;
  802.     DPSBinObjGeneric obj2;
  803.     } _dpsQ;
  804.   static const _dpsQ _dpsStat = {
  805.     DPS_DEF_TOKENTYPE, 3, 28,
  806.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineColor */
  807.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  808.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* SLB */
  809.     }; /* _dpsQ */
  810.   _dpsQ _dpsF;    /* local copy  */
  811.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  812.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  813.   static long int _dpsCodes[1] = {-1};
  814.   {
  815. if (_dpsCodes[0] < 0) {
  816.     static const char * const _dps_names[] = {
  817.     "SLB"};
  818.     long int *_dps_nameVals[1];
  819.     _dps_nameVals[0] = &_dpsCodes[0];
  820.  
  821.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  822.     }
  823.   }
  824.  
  825.   _dpsF = _dpsStat;    /* assign automatic variable */
  826.  
  827.   _dpsP[1].val.realVal = LineWidth;
  828.   _dpsP[0].val.realVal = LineColor;
  829.   _dpsP[2].val.nameVal = _dpsCodes[0];
  830.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  831. }
  832. #line 163 "DrawViewWraps.psw"
  833.  
  834.  
  835.